package com.nineyang.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * ClassName:AppBean
 * Description:绑定复杂属性
 * author: jiuyang
 * DateTime: 2025/1/15 上午11:19
 */
@ConfigurationProperties(prefix = "tjy2.app")
public class AppBean {

    private Address[] addresses1;
    private List<Address> addresses2;
    private Map<String,Address> addresses3;

    @Override
    public String toString() {
        return "AppBean{" +
                "addresses1=" + Arrays.toString(addresses1) +
                ", addresses2=" + addresses2 +
                ", addresses3=" + addresses3 +
                '}';
    }

    public void setAddresses1(Address[] addresses1) {
        this.addresses1 = addresses1;
    }

    public void setAddresses2(List<Address> addresses2) {
        this.addresses2 = addresses2;
    }

    public void setAddresses3(Map<String, Address> addresses3) {
        this.addresses3 = addresses3;
    }
}
